<?php
     include("../dbconnect.inc.php");
	 $form =$_POST["edit"];
	 $form["reg_time"] = date("Y-m-d H:i:s");
	 $form["pass"] = md5($form["pass"]);
	 extract($form);
	 $sql = "insert into users(username,password,sex,mail,tel,web,birthday,inter,intro,reg_time)";
	 $sql .="values('{$name}',";
	 $sql .="'{$pass}',";
	 $sql .="'{$sex}',";
	 $sql .="'{$mail}',";
	 $sql .="'{$tel}',";
	 $sql .="'{$web}',";
	 $sql .="'{$birthday}',";
	 $sql .="'{$inter}',";
	 $sql .="'{$intro}',";
	 $sql .="'{$reg_time}')";
	 $res = mysql_query($sql);
	 if(!$res){
	       die("database was wrong, please back and try again.");
		   }
     header("Location:msg.php?m=register_success");
?>